<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use NunoMaduro\Collision\Adapters\Phpunit\State;

class CourseLesson extends Model
{
    use HasFactory;
    protected $table='course_lesson';
    const TYPE_TEXT = 1;
    const TYPE_AUDIO = 2;
    const TYPE_VIDEO = 3;
    const TYPE_LIVE = 4;
    const STATUS_ENABLE = 0;
    const STATUS_DISABLE = 1;

    public static $statusMap = [
        self::STATUS_ENABLE => '启用',
        self::STATUS_DISABLE => '禁用',
    ];

    public static $typeMap = [
        self::TYPE_TEXT => '文本',
        self::TYPE_AUDIO => '音频',
        self::TYPE_VIDEO => '视频',
        self::TYPE_LIVE => '直播',
    ];

    protected $fillable = [
        'title',
        'type',
        'content',
        'lesson_file',
        'extends',
        'sort',
        'status',
    ];

}
